import Vue from 'vue'
import Vuex from 'vuex'
import getters from './getters'
import user from './modules/user'
import map from './modules/default/map'
import { getStorage } from '@/utils/auth'

Vue.use(Vuex)
const store = new Vuex.Store({
  modules: {
    user,
    map,
  },
  getters,
  state: {
    theme: getStorage('theme') ? getStorage('theme') : 'blue', // 主题
  },
})

export default store
